﻿/**
 *	\file		recurrence.cxx
 *	\date		(2014-12-30 17:31:00)/(2014-12-30 17:31:00)
 *-----------------------------------------------------------------------------
 *	\brief
 *	\version	1.0.0.1
 *	\author		Nick Shallery	(nicknide@gmail.com)
 *	\copyright	YOU HAVE ALL LEFT WITH THIS CODE WHILE YOU KEEP COMMENT IN EVERY COPY.
 *-----------------------------------------------------------------------------
**/

#include	"./recurrence.hxx"
#include	"./dream.h"

#include	"./reg_path.hxx"

#include	<lolix/imp/lolix_plugin_auto_release_lib.h>


lxsamsara::_inst::recurrence_inst::~recurrence_inst(void)
{
	_ref_fac->release();
	_alc->release();
	lolix::imp::plugin_auto_release_lib_release();
}


lolix::LOLIX_RETNV
lxsamsara::_inst::recurrence_inst::create_inst(base_type** out_ptr, lolix::dynamic_allocator* alc, lolix::ref_factory* ref_fac)
{
	this_type* ptr;
	LOLIX_RETNV rtv;
	if ( LOLIX_CHECK_ERROR(rtv = __Create_inst_set_alc(&ptr, alc, ref_fac)) )
		return rtv;
	(ptr->_ref_fac = ref_fac)->inc_ref();
	*out_ptr = ptr;
	lolix::imp::plugin_auto_release_lib_inc_ref();
	return rtv;
}


lolix::dynamic_allocator*
lxsamsara::_inst::recurrence_inst::__get_alc(void)const
{
	return _alc;
}


lolix::ref_factory*
lxsamsara::_inst::recurrence_inst::__get_ref_fac(void)const
{
	return _ref_fac;
}


lolix::LOLIX_RETNV
CreateRecurrenceInst(lxsamsara::recurrence** out_ptr, lolix::dynamic_allocator* alc, lolix::ref_factory* ref_fac)
{
	return lxsamsara::_inst::recurrence_inst::create_inst(out_ptr, alc, ref_fac);
}
